package xyz.syyrjx.blog.entity;

import xyz.syyrjx.blog._enum.State;

import java.util.Objects;
import java.util.Random;

public class Food {
    private Long id;
    private String food;
    private Integer state;


    public Food(){}

    public Food(Long id, String food) {
        this.id = id;
        this.food = food;
        this.state = State.NORMAL_STATE.getCode();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getFood() {
        return food;
    }

    public void setFood(String food) {
        this.food = food;
    }


    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "Food{" +
                "id=" + id +
                ", food='" + food + '\'' +
                ", state=" + state +
                '}';
    }

    public Food copy() {
        Food res = new Food(this.id, this.food);
        res.setState(this.state);
        return res;
    }
}
